/*
-----------------------------------------------------------------------------
This file is part of escog.

Copyright (c) 2009 Jacob Essex

escog is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

escog is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with escog.  If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------------
*/

///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 21 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "gui.h"

///////////////////////////////////////////////////////////////////////////

GUIMain::GUIMain( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( 600,300 ), wxDefaultSize );

	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );

	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxHORIZONTAL );

	m_staticText4 = new wxStaticText( this, wxID_ANY, wxT("Morrowind Ini"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText4->Wrap( -1 );
	bSizer4->Add( m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );

	mFileLocation = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*.ini"), wxDefaultPosition, wxDefaultSize, wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_USE_TEXTCTRL );
	bSizer4->Add( mFileLocation, 1, wxALL|wxEXPAND, 5 );

	bSizer3->Add( bSizer4, 0, wxEXPAND, 5 );

	m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer3->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );

	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxHORIZONTAL );

	wxBoxSizer* bSizer8;
	bSizer8 = new wxBoxSizer( wxVERTICAL );

	wxBoxSizer* bSizer11;
	bSizer11 = new wxBoxSizer( wxVERTICAL );

	m_staticText6 = new wxStaticText( this, wxID_ANY, wxT("Red mods contain GMSTs"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText6->Wrap( -1 );
	bSizer11->Add( m_staticText6, 0, wxALL, 5 );

	mModList = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
	bSizer11->Add( mModList, 1, wxALL|wxEXPAND, 5 );

	bSizer8->Add( bSizer11, 1, wxEXPAND, 5 );

	bSizer5->Add( bSizer8, 1, wxEXPAND, 5 );

	wxBoxSizer* bSizer9;
	bSizer9 = new wxBoxSizer( wxVERTICAL );

	m_staticText8 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText8->Wrap( -1 );
	bSizer9->Add( m_staticText8, 0, wxALL, 5 );

	m_button5 = new wxButton( this, wxID_ANY, wxT("Show Active GMST"), wxDefaultPosition, wxDefaultSize, 0 );
	m_button5->Enable( false );
	m_button5->SetToolTip( wxT("Shows GMSTs that will effect your game") );

	bSizer9->Add( m_button5, 0, wxALL, 5 );

	m_button9 = new wxButton( this, wxID_ANY, wxT("Remove Evil"), wxDefaultPosition, wxDefaultSize, 0 );
	m_button9->SetToolTip( wxT("Removes \"evil\" gmsts from the selected mod") );

	bSizer9->Add( m_button9, 0, wxALL|wxEXPAND, 5 );

	m_button7 = new wxButton( this, wxID_ANY, wxT("Remove Selected"), wxDefaultPosition, wxDefaultSize, 0 );
	m_button7->SetToolTip( wxT("Removes the selected GMSTs from their accociated file") );

	bSizer9->Add( m_button7, 0, wxALL|wxEXPAND, 5 );

	bSizer5->Add( bSizer9, 0, wxEXPAND, 5 );

	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxVERTICAL );

	wxBoxSizer* bSizer12;
	bSizer12 = new wxBoxSizer( wxVERTICAL );

	m_staticText7 = new wxStaticText( this, wxID_ANY, wxT("Red GMSTs are 'evil'"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText7->Wrap( -1 );
	bSizer12->Add( m_staticText7, 0, wxALL, 5 );

	mActiveList = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_VRULES );
	bSizer12->Add( mActiveList, 1, wxALL|wxEXPAND, 5 );

	bSizer10->Add( bSizer12, 1, wxEXPAND, 5 );

	bSizer5->Add( bSizer10, 2, wxEXPAND, 5 );

	bSizer3->Add( bSizer5, 1, wxEXPAND, 5 );

	m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("To Select a Single item, click on the item text\nTo Select multiple items, hold CTRL and click on the items you wish to select\nTo Select items between two items, click on an item, hold shift, and click on another item."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5->Wrap( -1 );
	bSizer3->Add( m_staticText5, 0, wxALL, 5 );

	this->SetSizer( bSizer3 );
	this->Layout();

	// Connect Events
	mFileLocation->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( GUIMain::onIniChanged ), NULL, this );
	mModList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( GUIMain::onModSelect ), NULL, this );
	m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIMain::onShowActive ), NULL, this );
	m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIMain::onCleanEvil ), NULL, this );
	m_button7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIMain::onRemoveSelected ), NULL, this );
}

GUIMain::~GUIMain()
{
	// Disconnect Events
	mFileLocation->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( GUIMain::onIniChanged ), NULL, this );
	mModList->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( GUIMain::onModSelect ), NULL, this );
	m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIMain::onShowActive ), NULL, this );
	m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIMain::onCleanEvil ), NULL, this );
	m_button7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIMain::onRemoveSelected ), NULL, this );
}
